package pacmanreturns;

import java.awt.*;

public class Sprite {
	public static final int WIDTH = 16;
	public static final int HEIGHT = 16;
	public static final Color COLOR = Color.GREEN;

	protected int direction = Game.LEFT;
	protected int nextDirection = Game.STOP;
	protected int x = 0;
	protected int y = 0;

	Game canvas;
	Maze maze;

	public Sprite(Game inCanvas, Maze inMaze) {
		canvas = inCanvas;
		maze = inMaze;
	}

	public void move() {
		switch (direction) {
			case Game.UP: y--; break;
			case Game.LEFT: x--; break;
			case Game.DOWN: y++; break;
			case Game.RIGHT: x++; break;
			default: break;
		}
	}

	public void setDirection(int inDirection) {
		nextDirection = inDirection;
	}

	public void setLocation(Point inPoint) {
		x = inPoint.x;
		y = inPoint.y;
	}

	public Point getLocation() {
		return new Point(x, y);
	}

	public int getDirection() {
		return direction;
	}
}